package com.lianxi.nmms.service;

import com.github.pagehelper.PageInfo;
import com.lianxi.nmms.entity.Dept;
import com.lianxi.nmms.entity.Product;
import com.lianxi.nmms.entity.ProductType;
import com.lianxi.nmms.exception.*;

import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * 翔哥
 * 2025年10月08日
 */
public interface DeptService {

    //添加部门
    void addDept(String name,String remark, HttpSession session) throws RequestParameterErrorException, ProductTypeExistException, DeptExistException, loginErrorException;

    PageInfo<Dept> findPage(String pageNo, String pageSize);

    List<Dept> findAll();

    List<Dept> findStatus();

    //添加子部门
    void addSonDept(String name, String remark, String fatherDeptId, HttpSession session) throws RequestParameterErrorException, DeptExistException, loginErrorException;

    //查询部门
    Dept findDeptById(String id) throws RequestParameterErrorException;

    //修改部门
    void updateDept(String id,String name ,String remark) throws RequestParameterErrorException, DeptExistException;

    //启用状态
    void enableDept(String id) throws RequestParameterErrorException, DeptStatusErrorException;

    //禁用状态
    void disableDept(String id) throws RequestParameterErrorException;
}
